//
//  Extension+UIImageView.swift
//  SYWeibo
//
//  Created by Eric on 16/7/20.
//  Copyright © 2016年 Eric. All rights reserved.
//

import UIKit
import SDWebImage
extension UIImageView{

    //实例化 UIImageView 快捷方式
    convenience init(imgName: String) {
       self.init(image: UIImage(named: imgName))
    }
    
    
    // 对SDWebImage 封装
    func sh_setImage(urlString: String?, placeholderImgName:String){
    
    self.sd_setImageWithURL(NSURL(string: urlString ?? ""), placeholderImage: UIImage(named: placeholderImgName))
    }

}
